<extend name="Base/common"/>
<block name="body">
    <div class="insurance">
        <div class="width1000">
            <img src="__PUBLIC__/Home/images/insurance1.png" alt="广告" class="ins_ad_img" />
            <div class="ins_tab">
                <a href="javascript:void(0);" class="f_l ins_tab_li">定制我的车险</a>
                <a href="try_count.html" class="f_l">试算我的保费</a>
            </div>
            <form action="{:U('finish')}" method="post" class="form_all" id="forms">
                <input type="hidden" name="c_order_no" value="{$c_order_no}">
                <div class="clearfix ins_select_list">
                    支付方式:
                    <select name="c_payment_type">
                        <option value="01">网上支付</option>
                        <option value="02">线下支付</option>
                    </select>
                </div>
                <input type="submit" value="下一步" class="form_submit" />
            </form>
        </div>
    </div>
    </block>
<block name="script">
<script type="text/javascript" src="__PUBLIC__/Home/js/insurance.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/carCommen.js"></script>
<script type="text/javascript" src="__PUBLIC__/Home/js/datePicker.js"></script>
<script type="text/javascript">
    /*时间控件*/
    $(function(){
        $(".datePicker").each(function(){
            $(this).datepicker({
                format: "yyyy-mm-dd",
                todayBtn: "linked",
                language: "zh-CN",
                autoclose: true,
                todayHighlight: true
            });
        }); 
    });
</script>
<script type="text/javascript">
    $(document).ready(function(){
        $('#forms').validate({
            rules: {
                car_type: "required",
                shortName_: "required"
            },
            messages: {
                car_type: "请选择车辆类型" ,
                shortName_: "请填写商品名称简写",
            },  
            showErrors: function(errorMap, errorList) { 
                $.each( errorList, function(i,v){
                    if(v.message!=""){ 
                        $(this.element).parent().parent().addClass('has_error');
                        $(this.element).nextAll(".help_msg").html(v.message);
                    }
                });  
            },
            /* 失去焦点时不验证 */
            onfocusout: false
        });
        $('#form1').find('input,select,textarea').on('change',function(){ 
            $(this).parent().parent().removeClass('has_error');
            $(this).nextAll(".help_msg").html("");
        });
    })
</script>
</block>
